.f-wrapper {
  display: flex;
  position: relative;
  flex-wrap: wrap;
  width: 100%;
  height: 100%;
}

.f-menu {
  position: relative;
  width: 100rem;
  max-width: 25vw;
  height: 100%;
  display: flex;
  justify-content: center;

  &--title {
    font-size: var(--inner-title-size);
    margin-right: auto;

    &-right {
      margin-left: auto;
      margin-right: 0;
    }
  }

  &--legend {
    font-size: var(--inner-text-size);
  }

  &--left {
    margin-left: 0;
  }

  &--right {
    margin-right: 0;
  }

  &__content {
    width: 80rem;
    max-width: 80%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  &__content-header {
    margin-top: 20%;
    width: 100%;
    position: relative;
    min-height: 5vw;
    flex: 0 1 auto;
    padding-left: 1rem;
    background-image: url('../images/l-title-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;

    &--right {
      background-image: url('../images/r-title-bg.png');
      padding-right: 1rem;
    }
  }
  &__content-main {
    flex: 1 1 0;
    padding: var(--inner-padding, 16px);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
  }
}

.make-circle-transform(@d) {
  transform: translate(-50%, -50%) rotate(@d);
}

.f-right-card {
  &__wrapper {
    display: flex;
    width: 100%;
    margin-bottom: var(--inner-padding);
    flex-direction: column;
  }

  &--title {
    font-size: var(--inner-subtitle-size, 1rem);
    width: 100%;
    position: relative;

    &::after {
      position: absolute;
      content: '';
      top: 0;
      right: 0;
      bottom: 0;
      width: 60%;
      background-size: contain;
      background-image: url('../images/title-d.png');
      background-position: center;
      background-repeat: no-repeat;
    }
  }

  &__content {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    font-size: 20px;
    padding: 0  calc(2 * var(--inner-bigger-size));

    &::before,
    &::after {
      position: absolute;
      content: '';
      top: 0;
      bottom: 0;
      width: calc(2 * var(--inner-bigger-size));
      background-size: contain;
      background-repeat: no-repeat;
    }

    &::before {
      left: 0;
      background-image: url('../images/m-l-border.png');
    }
    &::after {
      right: 0;
      background-image: url('../images/m-r-border.png');
      background-position: right;
    }
  }

  &--text {
    color: var(--light-cyan);

    & > em {
      font-size: 1vw;
      font-weight: 600;
    }

    & > em,
    & > span {
      padding-right: 8px;
    }
  }

  &--tag {
    font-size: var(--inner-text-size);
  }

  &--icon-left,
  &--icon-right {
    width: 5rem;
    height: 5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    margin-right: 1rem;

    &.r-icon-1::before,
    &.r-icon-2::before,
    &.r-icon-3::before,
    &.r-icon-4::before,
    &.r-icon-5::before,
    &.r-icon-6::before,
    &.r-icon-7::before,
    &.r-icon-8::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
      background-position: center;
      background-repeat: no-repeat;
      background-size: 40%;
    }

    &.r-icon-1::before {
      background-image: url('../images/r-icon-1.png');
      background-size: 50%;
    }

    &.r-icon-2::before {
      background-image: url('../images/r-icon-2.png');
      background-size: 50%;
    }

    &.r-icon-3::before {
      background-image: url('../images/r-icon-3.png');
    }

    &.r-icon-4::before {
      background-image: url('../images/r-icon-4.png');
    }

    &.r-icon-5::before {
      background-image: url('../images/r-icon-5.png');
    }

    &.r-icon-6::before {
      background-image: url('../images/r-icon-6.png');
    }

    &.r-icon-7::before {
      background-image: url('../images/r-icon-7.png');
    }

    &.r-icon-8::before {
      background-image: url('../images/r-icon-8.png');
    }
  }

  &--icon-left {
    background-image: url('../images/r-border-1.png');
  }

  &--icon-right {
    background-image: url('../images/r-border-2.png');
  }
}

@keyframes rotate-circle {
  0% {
    .make-circle-transform(0deg);
  }
  100% {
    .make-circle-transform(360deg);
  }
}

.f-map__wrapper {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;

  &::after {
    position: absolute;
    content: '';
    left: 50%;
    top: 50%;
    width: 120rem;
    height: 120rem;
    background-image: url('../images/circle.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    .make-circle-transform(0deg);
    animation: rotate-circle 60s linear infinite;
    z-index: 0;
  }
}

.f-left-row {
  &__wrapper {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    flex: 0 1 auto;
    padding: 0.6vw 0;

    &.sub {
      padding: 0.5vw 0;
    }
  }

  &--entry,
  &--exit {
    flex: 1;
    align-items: center;
    display: inline-flex;
    position: relative;
  }

  &--entry .f-left-row--number {
    right: 0;
  }

  &--exit .f-left-row--number {
    left: 0;
  }

  &--entry-bar__wrapper {
    padding-left: 10px;
  }

  &--exit-bar__wrapper {
    padding-right: 10px;
  }

  &--entry-bar {
    stroke: var(--light-cyan);
  }

  &--exit-bar {
    stroke: var(--light-blue);
  }

  &--nation {
    width: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8vw;
  }

  &--number {
    font-size: 0.8vw;
    position: absolute;
  }
}

.l-icon-1,
.l-icon-2 {
  display: inline-flex;
  background-image: url('../images/l-icon-1.png');
  background-size: contain;
  background-repeat: no-repeat;
  width: 1vw;
  height: 1vw;
  margin: 0 1rem;
}

.l-icon-2 {
  background-image: url('../images/l-icon-2.png');
}

.f-nation-grid__wrapper {
  height: 8vw;
  overflow: auto;
  position: relative;
  display: flex;
}

.f-nation-grid {
  display: grid;
  grid-template-columns: 33.33% 33.33% 33.33%;
  grid-template-rows: 2vw 2vw 2vw 2vw;
  max-height: 8vw;
  overflow: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  &::-webkit-scrollbar {
    display: none;
  }
}

.f-nation {
  text-align: center;
  vertical-align: middle;
  line-height: 1.5vw;
  margin: 8px;
  font-size: 0.8vw;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  background-image: url('../images/l-list-titlebg.png');
  background-size: cover;
  background-repeat: no-repeat;
  user-select: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;

  &--small {
    font-size: 0.6vw;
  }
}

.f-menu--nav-btn {
  position: absolute;
  top: 2vw;
  left: 4vw;
  padding: 0.1rem 2rem;
  z-index: 99;
  background: var(--light-blue-opacity);
  display: flex;


  &__content {
    color: var(--light-cyan);
    font-size: var(--inner-subtitle-size);
    opacity: 0.5;
    margin: 0 1rem;
    position: relative;
    cursor: pointer;

    &:not(:last-child)&::after {
      content: "/";
      opacity: 0.5;
      margin-left: 1rem;
    }

    &.active {
      opacity: 1;
    }
  }
}

.f-list {
  display: grid;
  grid-template-columns: 15% 25% 25% 25% 10%;
  grid-template-rows: repeat(8, 2vw);
  overflow: auto;
  max-height: 18vw;
  scroll-behavior: smooth;
  &::-webkit-scrollbar {
    display: none;
  }

  &--title__wrapper {
    grid-template-rows: 1.5vw;
    width: 100%;
    overflow: hidden;
  }

  &--item {
    padding: 0.6vw 0.5rem;
    font-size: 0.6vw;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    height: 2vw;
  }

  &--title {
    background-color: var(--light-cyan-opacity);
    font-size: 0.6vw;
    padding: 1rem 0.5rem;
    word-break: keep-all;
  }

  &--even-row {
    background: rgba(255, 255, 255, 0.1);
  }
}

.f-tab {
  outline: none;
  user-select: none;
  border: 0;
  border-radius: 4px;
  padding: 8px 24px 8px 40px;
  font-size: var(--inner-subtitle-size);
  font-weight: 600;
  margin-right: 1rem;
  color: white;
  background: transparent;
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;

  &::before {
    position: absolute;
    content: '';
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    left: 8px;
  }

  &::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  &.entry {
    &::after {
      background-image: url('../images/r-border-1.png');
    }
    &::before {
      background-image: url('../images/l-icon-1.png');
    }

    &.f-tab--active {
      background-color: var(--light-cyan-opacity);
    }
  }

  &.exit {
    &::after {
      background-image: url('../images/r-border-2.png');
    }
    &.f-tab--active {
      background-color: var(--light-blue-opacity);
    }
    &::before {
      background-image: url('../images/l-icon-2.png');
    }
  }
}

@keyframes star-animation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.f-dest--icon {
  animation: star-animation 3s ease infinite;
}

.f-tooltip {
  font-size: 0.6vw;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  color: white;
  position: fixed;
  z-index: 999;
  transform: translate(-50%, -120%);
}
